\begin{tabbing} ecl{-}machine2($i$; ${\it ds}$; ${\it da}$; $x$; $T$; ${\it ks}$; $a$; ${\it upd}$) \\[0ex]$\,\equiv$$_{\mbox{\scriptsize def}}$$\;\;$Rall(\=update{-}spec{-}vars(${\it upd}$);\+ \\[0ex]$z$.R{-}state{-}var(\=$i$;\+ \\[0ex]fpf{-}join(id{-}deq; ${\it ds}$; fpf{-}single($x$; $T$)); \\[0ex]${\it da}$; \\[0ex]$z$; \\[0ex]fpf{-}ap(${\it ds}$; id{-}deq; $z$); \\[0ex]${\it ks}$; \\[0ex]($\lambda$$k$,$s$,$v$,${\it z'}$. list\_accum(\=${\it z'}$,${\it nf}$.let $n$,$f$ = ${\it nf}$\+ \\[0ex]in \\[0ex]if $a$($n$,$k$,$s$,$v$,$s$($x$)) then $f$($s$,$v$) else ${\it z'}$ fi ; \\[0ex]${\it z'}$; \\[0ex]fpf{-}cap(\=${\it upd}$;\+ \\[0ex]product{-}deq(\=Knd;\+ \\[0ex]Id; \\[0ex]Kind{-}deq; \\[0ex]id{-}deq); \-\\[0ex]$<$$k$, $z$$>$; \\[0ex][]))))) \-\-\-\- \end{tabbing}